package cn.crdeng.frametest.subject.controller;

import cn.crdeng.frametest.subject.domain.Student;
import cn.crdeng.frametest.subject.service.IStudentService;
import io.swagger.annotations.Api;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 学生表 前端控制器
 * </p>
 *
 * @author crdeng
 * @since 2022-06-23
 */
@RestController
@RequestMapping("/subject/student")
@Api(value = "学生",tags = "tags")
public class StudentController {

    @Autowired
    private IStudentService studentService;

    @GetMapping("/list")
    @Operation(summary = "列表")
    public List<Student> list(){
        List<Student> list = studentService.list();
        return list;
    }
}
